import request from '@/utils/request'

export function validateCode(data) {
  return request({
    url: '/user/user/userEmail',
    method: 'post',
    data
  })
}

export function register(data) {
  return request({
    url: '/user/user/register',
    method: 'post',
    data
  })
}

export function findPassword(data) {
  return request({
    url: '/user/user/findPassword',
    method: 'post',
    data
  })
}

export function login(data) {
  return request({
    url: '/user/user/login',
    method: 'post',
    data
  })
}

export function personCard(query) {
  return request({
    url: '/user/user/personCard',
    method: 'get',
    params: query
  })
}

export function personClassify(query) {
  return request({
    url: '/user/user/personClassify',
    method: 'get',
    params: query
  })
}

export function personRecord(query) {
  return request({
    url: '/user/user/personRecord',
    method: 'get',
    params: query
  })
}

export function personInfo(query) {
  return request({
    url: '/user/user/personInfo',
    method: 'get',
    params: query
  })
}

export function baseInfo(data) {
  return request({
    url: '/user/user/baseInfo',
    method: 'post',
    data
  })
}

export function schoolInfo(data) {
  return request({
    url: '/user/user/schoolInfo',
    method: 'post',
    data
  })
}

export function updateEmail(data) {
  return request({
    url: '/user/user/updateEmail',
    method: 'post',
    data
  })
}

export function updatePassword(data) {
  return request({
    url: '/user/user/updatePassword',
    method: 'post',
    data
  })
}

export function listRole(query) {
  return request({
    url: '/user/role/listRole',
    method: 'get',
    params: query
  })
}

export function listResource() {
  return request({
    url: '/user/resource/listResource',
    method: 'get'
  })
}

export function insertRole(data) {
  return request({
    url: '/user/role/insertRole',
    method: 'post',
    data
  })
}

export function roleById(query) {
  return request({
    url: '/user/role/roleById',
    method: 'get',
    params: query
  })
}

export function updateDefunct(data) {
  return request({
    url: '/user/role/updateDefunct',
    method: 'post',
    data
  })
}

export function deleteRole(query) {
  return request({
    url: '/user/role/deleteRole',
    method: 'post',
    params: query
  })
}

export function userList(query) {
  return request({
    url: '/user/user/userList',
    method: 'get',
    params: query
  })
}

export function updateUserDefunct(data) {
  return request({
    url: '/user/user/updateUserDefunct',
    method: 'post',
    data
  })
}

export function insertUser(data) {
  return request({
    url: '/user/user/insertUser',
    method: 'post',
    data
  })
}

/* export function getInfo(token) {
  return request({
    url: '/vue-admin-template/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}*/

